package xutils

func RecoverGo(f func(), recoverHandler func(err interface{})) {
	go func() {
		defer func() {
			if err := recover(); err != nil {
				recoverHandler(err)
			}
		}()
		f()
	}()
}
